Documents
Documents enable you to expand an agent’s knowledge by adding information from attached files or HTTP/HTTPS URLs.
-
Improved accuracy: By grounding responses in real-time retrieved data, this approach reduces hallucinations and enhances factual reliability.
-
Dynamic adaptability: The model adjusts its responses based on the latest information from the knowledge source.
-
Domain-specific knowledge: Ideal for use cases that demand specialized or frequently updated knowledge, such as customer support, research, or product documentation.
AI Agents framework supports the following methods of working with documents
RAG in every query – implements classic Retrieval-Augmented Generation (RAG) technique, which provides document extracts relevant to user’s query.
RAG via doc_search tool – implements agentic RAG pipeline, where LLM can decide when it needs document extracts.
Full content in prompt – includes complete content of attached documents in the prompt. This mode is suitable for relatively short documents.
Content via doc_get tool – implements agentic pipeline, where LLM can request content from specific documents or their sections.
For more details, see Using documents.